package com.octopus.registry;

import com.octopus.json.Json;

public class ServiceUtils {
	public static Call getCallFromResultJson(Json input, Json result){
		if(input != null){
			Object object = input.getReservedMap(ServiceConstants.SYSTEM_RESERVED_SIMPLE_CALL);
			return (object != null && object instanceof Call ? (Call)object : null);
		}else if(result != null){
			Object object = result.getReservedMap(ServiceConstants.SYSTEM_RESERVED_SIMPLE_CALL);
			return (object != null && object instanceof Call ? (Call)object : null);
		}else{
			return null;
		}
	}
}
